﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StateGrid.MDBservice;

namespace StateGrid.DLBK
{
    public class DLBK_PM : PM
    {
        public int id
        {
            get;
            set;
        }
        /// <summary>
        /// 分类编码
        /// </summary>
        public String flbm
        {
            get;
            set;
        }
        /// <summary>
        /// 标题
        /// </summary>
        public String bt
        {
            get;
            set;
        }
        /// <summary>
        /// 作者
        /// </summary>
        public String zz
        {
            get;
            set;
        }
        /// <summary>
        /// 日期
        /// </summary>
        public DateTime rq
        {
            get;
            set;
        }

        /// <summary>
        /// 编号
        /// </summary>
        public int bh
        {
            get;
            set;
        }

        /// <summary>
        /// 栏目
        /// </summary>
        public String lm
        {
            get;
            set;
        }

        /// <summary>
        /// 正文
        /// </summary>
        public String zw
        {
            get;
            set;
        }
        /// <summary>
        /// 更新日期
        /// </summary>
        public DateTime gxrq
        {
            get;
            set;
        }
        /// <summary>
        /// 登录人
        /// </summary>
        public String dlr
        {
            get;
            set;
        }
        public override string ToString()
        {
            String ret;
            ret = "[分类编码]" + this.flbm + "[标题]" + this.bt + " [作者]" + this.zz;
            return ret;
        }

        public override string AllContent()
        {
            String ret = "('" + flbm + "','" + bt + "','" + zz + "','" + rq + "','" + bh + "','" + lm + "','" + zw + "','" + gxrq + "','" + dlr + "')";
            return ret;
        }

        public override void fillEmptyStringAsNull()
        {
            String temp = "NULL";
            if (String.Empty.Equals(this.flbm)) flbm = temp;
            if (String.Empty.Equals(this.bt)) bt = temp;
            if (String.Empty.Equals(this.zz)) zz = temp;
            if (String.Empty.Equals(this.lm)) lm = temp;
            if (String.Empty.Equals(this.zw)) zw = temp;
        }

        public override void eraseNullInEmptyString()
        {
            String temp = "NULL";
            if (temp.Equals(this.flbm)) flbm = String.Empty;
            if (temp.Equals(this.bt)) bt = String.Empty;
            if (temp.Equals(this.zz)) zz = String.Empty;
            if (temp.Equals(this.lm)) lm = String.Empty;
            if (temp.Equals(this.zw)) zw = String.Empty;
        }
    }
}